<template>
  <div class="hello">
    <h1>{{ title }}</h1>
  </div>
</template>

<script>
export default {
  name: "HelloWorld",
  data: function () {
    return { title: "123" };
  },
  props: {
    msg: String,
  },
  created: function () {
    var ua = navigator.userAgent.toLowerCase();
    //1 判断是什么平台
    // alert(ua);
    //安卓
    if (ua.indexOf("android") > -1) {
      window.location.href =
        "openwjtr://com.qyt.clgshops"; /***打开app的协议，有安卓同事提供***/
      window.setTimeout(function () {
        window.location.href =
          "http://www.wjtr.com/download/index.html"; /***打开app的协议，有安卓同事提供***/
      }, 1000);
    } else if (ua.indexOf("ios") > -1) {
      this.title = "ios";
      alert(222);
      window.location.href =
        "openwjtr://com.qyt.clgshops"; /***打开app的协议，有安卓同事提供***/
      window.setTimeout(function () {
        window.location.href =
          "http://www.wjtr.com/download/index.html"; /***打开app的协议，有安卓同事提供***/
      }, 1000);
    } else {
      console.log(4);
    }
  },
};
</script>